/*
 * Phone.cpp
 *
 *  Created on: 30 Μαϊ 2010
 *      Author: Sartios
 */

#include "Phone.h"

namespace Teacher {

Phone::Phone(){
	number_="";
	category_="";
	ownersAem_="";
}

Phone::Phone(const string *number,const string *category,const string *ownersAem) {

	if((0!=number)&&(0!=category)&&(0!=ownersAem)){

		setNumber(number);
		setCategory(category);
		setOwnersAem(ownersAem);

	}

}

Phone::Phone(const ITeacherPhone *phone){
	if(0!=phone){
		setNumber(&(phone->getNumber()));
		setCategory(&(phone->getCategory()));
		setOwnersAem(&(phone->getOwnersAem()));
	}
}

Phone::~Phone() {
	// TODO Auto-generated destructor stub
}

bool	Phone::setNumber(const string *number){
	if(0!=number){
		number_=*number;
		return true;
	}
	return false;
}

string	Phone::getNumber()const{
	if(" "!=number_){
		return number_;
	}
	return NULL;
}

bool	Phone::setCategory(const string *category){
	if(0!=category){
		category_=*category;
		return true;
	}
	return false;
}

string	Phone::getCategory()const{
	if(" "!=category_){
		return category_;
	}
	return NULL;
}

bool	Phone::setOwnersAem(const string *ownersAem){
	if(0!=ownersAem){
		ownersAem_=*ownersAem;
		return true;
	}
	return false;
}

string	Phone::getOwnersAem()const{
	if(""!=ownersAem_){
		return ownersAem_;
	}
	return NULL;
}
}
